package com.game.mapper;

import java.text.MessageFormat;
import java.util.List;
import java.util.Map;

import com.game.modal.PointDetail;

public class PointDetailProvider {
	public String insertAll(Map map){
		  List<PointDetail> details = (List<PointDetail>) map.get("list");  
	        StringBuilder sb = new StringBuilder();  
	        sb.append("INSERT INTO point_detail ");  
	        sb.append("(point_id,point,receiver_id,creat_time)");  
	        sb.append("VALUES ");
	        int detailSize = details.size();
	        for (int i = 0; i < details.size(); i++) { 
	        	MessageFormat mf = new MessageFormat("(#, #'{'list[{0}].name})");  
	            if (i < detailSize - 1) {
	                sb.append(",");  
	            }  
	        }  
	        return sb.toString();
	}
}
